package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ExamBankMapper;
import com.ruoyi.system.domain.ExamBank;
import com.ruoyi.system.service.IExamBankService;
import com.ruoyi.common.core.text.Convert;

/**
 * 题库Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-30
 */
@Service
public class ExamBankServiceImpl implements IExamBankService 
{
    @Autowired
    private ExamBankMapper examBankMapper;

    /**
     * 查询题库
     * 
     * @param id 题库主键
     * @return 题库
     */
    @Override
    public ExamBank selectExamBankById(Long id)
    {
        return examBankMapper.selectExamBankById(id);
    }

    /**
     * 查询题库列表
     * 
     * @param examBank 题库
     * @return 题库
     */
    @Override
    public List<ExamBank> selectExamBankList(ExamBank examBank)
    {
        return examBankMapper.selectExamBankList(examBank);
    }

    /**
     * 新增题库
     * 
     * @param examBank 题库
     * @return 结果
     */
    @Override
    public int insertExamBank(ExamBank examBank)
    {
        return examBankMapper.insertExamBank(examBank);
    }

    /**
     * 修改题库
     * 
     * @param examBank 题库
     * @return 结果
     */
    @Override
    public int updateExamBank(ExamBank examBank)
    {
        return examBankMapper.updateExamBank(examBank);
    }

    /**
     * 批量删除题库
     * 
     * @param ids 需要删除的题库主键
     * @return 结果
     */
    @Override
    public int deleteExamBankByIds(String ids)
    {
        return examBankMapper.deleteExamBankByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除题库信息
     * 
     * @param id 题库主键
     * @return 结果
     */
    @Override
    public int deleteExamBankById(Long id)
    {
        return examBankMapper.deleteExamBankById(id);
    }
}
